perm filename MCCUS.PRO[257,JMC] blob sn#040383 filedate 1973-05-06 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	MCCUSTERING
C00007 ENDMK
C⊗;
MCCUSTERING

	Mccustering is a generalization of custering.  It is a form of averaging
designed to kill isolated points, smooth, but preserve "real" contrast where it
exists.  Consider each point as the center of a 2k+1 by 2k+1 neighborhood.  Its
value is replaced by the average of the values of its m neighbors closest to it
in value.  The effect is that if a point has enough neighbors close enough to it
in value, its value will be preserved.  Sharp edges will be preserved.  If we 
choose m≤2k, then a line one pixel wide will be preserved.  The slogan is "I can
get by with a little help from my friends".

	If the intensity resolution is not high, then mccustering doesn't take
a great amount of computation.  Suppose, for example, that there are 64 levels
of intensity.  Then we work with a histogram of the number of points in the
neighborhood with each level of intensity.  Starting from the level corresponding
to the value at the point, we examine adjacent intensity values in the histogram
until we have a sum of m.  Then we average the sums.  If we index along a row,
the histograms can be updated by removing the points along the left boundary
of the neighborhood and adding the ones along the right boundary.  Thus the
work of updating is proportional to k rather than to k↑2.  With 64 intensities,
there is a bad worst case where the point has value 32 and all the other points
are concentrated at 0 and 33, but usually we will accumulate the m friends
looking at only a few values in the histogram.  If there are more intensity
values, they can be grouped.  A collection of fixed groups  does not increase
the work, but if one wished to center the groupings around the value at the
point, the updating scheme could not be used and the calculation would be
more expensive.

	There are various elaborations possible.

	1. Suppose we are especially interested in preserving edges while
wanting to average rather fiercely otherwise.  Then we may determine the
p best friends of x, determine the average slope of the lines connecting
them with x and get x's m friends from a slanting window having that
slope if the p friends are seem to be more or less linearly oriented.
The precise criterion for this escapes me.

	2. Mccustering is also possible when we have a vector field as in the
color case, but the histogram technique won't work as well.

	3. Textured areas will be somewhat simplified, but the texture will
be preserved by mccustering.

	4. After mccustering, the range of values in a neighborhood can be
introduced as a component of the field.  If we then mccuster it we may get
a smoothly varying quantity partially characterizing the color of a region.